//
//  WaveTableViewCell.m
//  MyYiJianKangApp
//
//  Created by 张国文 on 16/5/5.
//  Copyright © 2016年 hangzhouyijiyin. All rights reserved.
//

#import "WaveTableViewCell.h"

@implementation WaveTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addMySubview];
    }
    return self;
}

// 布局
- (void)addMySubview
{
   
    
    // 波浪视图
        self.waveView = [[TYWaveProgressView alloc] initWithFrame:CGRectMake((375 - 156) / 2 * kAdjustParamater, 33 * kAdjustParamater, 156 * kAdjustParamater, 180 * kAdjustParamater)];
        self.waveView.waveViewMargin = UIEdgeInsetsMake(15 * kAdjustParamater, 8 * kAdjustParamater, 8 * kAdjustParamater, 10 * kAdjustParamater);
        self.waveView.backgroundImageView.image = [UIImage imageNamed:@"进度框烧杯3-01"];
        self.waveView.numberLabel.text = @"66%";
      //  self.waveView.numberLabel.font = [UIFont systemFontOfSize:45 * kAdjustParamater];
    self.waveView.numberLabel.font = [UIFont fontWithName:@"Helvetica-Oblique" size:50 * kAdjustParamater];
    
        self.waveView.numberLabel.textColor = [UIColor colorWithRed:166 / 255.0 green:208 / 255.0 blue:107 / 255.0 alpha:1];

        self.waveView.percent = 0.6;
        [self.contentView addSubview:_waveView];
        [self.waveView startWave];
    // 检测几项
        UILabel *jianCeJiXiangLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.waveView.bottom + 25* kAdjustParamater, kScreenWidth, 15 * kAdjustParamater)];
   //     jianCeJiXiangLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
        jianCeJiXiangLabel.text = @"您一共检测了10项";
        jianCeJiXiangLabel.textColor = [UIColor blackColor];
        jianCeJiXiangLabel.textAlignment = NSTextAlignmentCenter;
        jianCeJiXiangLabel.font = [UIFont systemFontOfSize:k16Big];
        [self.contentView addSubview:jianCeJiXiangLabel];
    
    //    // 健康指数
        UILabel *jianKangZhiShuLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, jianCeJiXiangLabel.bottom + 13 * kAdjustParamater, kScreenWidth, 15 * kAdjustParamater)];
     //   jianKangZhiShuLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
        jianKangZhiShuLabel.text = @"您的健康指数高于66%用户";
        jianKangZhiShuLabel.textColor = [UIColor blackColor];
        jianKangZhiShuLabel.textAlignment = NSTextAlignmentCenter;
        jianKangZhiShuLabel.font = [UIFont systemFontOfSize:k16Big];
        [self.contentView addSubview:jianKangZhiShuLabel];
    
    // 底部灰色条
    UILabel *grayLineOnBottom = [[UILabel alloc] initWithFrame:CGRectMake(0, (330 - 1) * kAdjustParamater, kScreenWidth, 1 * kAdjustParamater)];
    grayLineOnBottom.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.07];
    [self.contentView addSubview:grayLineOnBottom];
    
}



@end
